{extend name="base_iframe" /}


{block name="body"}




<div class="row box-ota-info form-horizontal">
	<div class="col-md-12">

		<div class="col-md-12">&nbsp;</div>

        <div class="col-md-3">
        	<div class="box box-danger collapsed-box box-solid">
        		<div class="box-header with-border">
        			<h3 class="box-title">商品类型 ： {$type_name}</h3>
        		</div>
        	</div>
        </div>

		<div class="col-md-12">
          <div class="box box-danger box-solid">
            <div class="box-header with-border">
              <h3 class="box-title">注意</h3>

              <div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>

                <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
              </div>
            </div>
            <div class="box-body">
            	<h4>1、如想修改商品类型，请在 商品编辑 》》商品属性 中修改。</h4>
				<h4>2、选择其他类型，点击修改后，会把原来属性值和规格值全部清空！</h4>
            </div>
          </div>
        </div>

		<div class="col-md-12">
			<div class="box box-info box-solid">
				<div class="box-header with-border">
					<h3 class="box-title">规格选择</h3>
					<div class="box-tools pull-right">
						<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
						</button>
					</div>
				</div>

				<div class="box-body">
					<!-- 核心 -->
					<div class="panel-body" id="specList">
						{volist name="specInfo" id="v" key="k"}
						<div class="row cl" server-id="{$v.id}" server-name="{$v.spec_name}">
							<label class="form-label col-xs-4 col-sm-2">{$v.spec_name}：</label>
							<div class="formControls col-xs-8 col-sm-10">
								<div class="skin-minimal" id="spec_{$v.id}">
									{volist name="v.item" id="v1"}
									<div class="check-box col-sm-1">
										<input type="checkbox" {if condition="in_array($v1.id,$specIdArray)"}checked{/if} tem-id="{$v1.id}" value="{$v1.id}">
										<label>{$v1.item}</label>
									</div>
									{/volist}
								</div>
							</div>
						</div>
						{/volist}
					</div>

				</div>
			</div>
		</div>



		<div class="col-md-12">
			<div class="box box-info box-solid">
				<div class="box-header with-border">
					<h3 class="box-title">规格设置</h3>
					<div class="box-tools pull-right">
						<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
						</button>
					</div>
				</div>

				<div class="box-body">
					<form class="ajax-form"  method="post" >
						<input type="hidden" name="goods_id" value="{$goods_id}">
						<input type="hidden" id="specItemInfoJson" name="_specItemInfo" value='{$specItemInfoJson}'>
						<table class="table table-border table-bordered table-bg table-hover" id="tableAttr">
						</table>
					</form>
				</div>

			</div>
		</div>


	</div>
</div>



{/block}

{block name="script"}
	<script type="text/javascript" src="__AJS__/goods/set_goods_spec.js"></script>
{/block}